package com.tdwyz.fictionmanage.utils;

/**
 * @author 14543
 * @version 1.0
 * @description: TODO
 * @date 2024/7/29 16:04
 */
public class URLUtil {

    /**
     * 获取 URL 的主机部分
     * @param urlString
     * @return
     */
    public static String getBaseUrl(String urlString) {
        int index = urlString.indexOf("/", urlString.indexOf("//") + 2);
        if (index != -1) {
            return urlString.substring(0, index);
        }
        return urlString;
    }
}
